import {createRouter, createWebHistory} from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [

    {
      path: '/',
      name: 'Login',
      component: () => import('@/views/Login.vue'),
    },
    {
      path: '/manager',
      name: 'Manager',
      component: () => import('@/views/manager/Manager.vue'),
      redirect: '/results',
      children: [
        {
          path: '/results',
          name: 'Results',
          component: () => import('@/views/manager/Results.vue'),
        },
        {
          path: '/questions',
          name: 'Question',
          component: () => import('@/views/manager/Question.vue'),
        },
        {
          path: '/visual',
          name: 'Visual',
          component: () => import('@/views/manager/Visual.vue'),
        },
        {
          path: '/exit',
          name: 'Exit',
        }
    ]
    },
    {
      path: '/mbti',
      name: 'Mbti',
      component: () => import('@/views/Mbti/Mbti.vue'),
      redirect: '/test',
      children: [
        {
          path: '/person',
          name: 'Person',
          component: () => import('@/views/Mbti/Person.vue'),
        },
        {
          path: '/test',
          name: 'Test',
          component: () => import('@/views/Mbti/Test.vue'),
        },
        {
          path: '/exit',
          name: 'Exit',
        }
      ]
    },
    {
      path: '/infp',
      name: 'INFP',
      component: () => import('@/views/Mbti/Result/INFP.vue'),
    },
    {
      path: '/enfj',
      name: 'ENFJ',
      component: () => import('@/views/Mbti/Result/ENFJ.vue'),
    },
    {
      path: '/enfp',
      name: 'ENFP',
      component: () => import('@/views/Mbti/Result/ENFP.vue'),
    },
    {
      path: '/entj',
      name: 'ENFJ',
      component: () => import('@/views/Mbti/Result/ENTJ.vue'),
    },
    {
      path: '/entp',
      name: 'ENTP',
      component: () => import('@/views/Mbti/Result/ENTP.vue'),
    },
    {
      path: '/esfj',
      name: 'ESFJ',
      component: () => import('@/views/Mbti/Result/ESFJ.vue'),
    },
    {
      path: '/esfp',
      name: 'ESFP',
      component: () => import('@/views/Mbti/Result/ESFP.vue'),
    },
    {
      path: '/estp',
      name: 'ESTP',
      component: () => import('@/views/Mbti/Result/ESTP.vue'),
    },
    {
      path: '/intj',
      name: 'INTJ',
      component: () => import('@/views/Mbti/Result/INTJ.vue'),
    },
    {
      path: '/istp',
      name: 'ISTP',
      component: () => import('@/views/Mbti/Result/ISTP.vue'),
    },
    {
      path: '/istj',
      name: 'ISTJ',
      component: () => import('@/views/Mbti/Result/ISTJ.vue'),
    },
    {
      path: '/isfp',
      name: 'ISFP',
      component: () => import('@/views/Mbti/Result/ISFP.vue'),
    },
    {
      path: '/intp',
      name: 'INTP',
      component: () => import('@/views/Mbti/Result/INTP.vue'),
    },
    {
      path: '/estj',
      name: 'ESTJ',
      component: () => import('@/views/Mbti/Result/ESTJ.vue'),
    },
    {
      path: '/infj',
      name: 'INFJ',
      component: () => import('@/views/Mbti/Result/INFJ.vue'),
    },
    {
      path: '/isfj',
      name: 'ISFJ',
      component: () => import('@/views/Mbti/Result/ISFJ.vue'),
    }
  ]
})

export default router
